package com.charmzenus.it.zuul.base;

/**
 * 异常抛出，自定义code 跟AppControllerActive联用，
 * 当在Impl中，返回错误json的时候，直接抛出改异常。则能返回固定好的json数据
 */
public class MyErrorException extends RuntimeException {
    private static final long serialVersionUID = 1L;

    private Integer code = -1;

    public MyErrorException() {
        super();
    }

    public MyErrorException(String msg) {
        super(msg);
    }

    public MyErrorException(String msg, Integer errorCode) {
        super(msg);
        code = errorCode;
    }

    public Integer getCode() {
        return code;
    }

}
